package com.nus.beans;

import java.util.Date;

/**
 * Created by IntelliJ IDEA.
 * User: dell
 * Date: 9/15/12
 * Time: 11:40 PM
 * To change this template use File | Settings | File Templates.
 */
public class User {
	private int userId;
    private String password;
    private String loginName;
    private String lastName;
    private UserType userType;
    private String firstName;
    private String address;
    private long phoneNumber;
    private Date dateOfBirth;
    private long basicSalary;
    private int remainingLeaves;
    private UserStatus status;
    private int failedLoginAttempts;
    private Date lastLoginFailedTime;
    private UserSubType userSubType;

    public User() {
        status = UserStatus.ACTIVE;
    }

    public UserStatus getStatus() {
        return status;
    }

    public void setStatus(UserStatus status) {
        this.status = status;
    }

    public String getFirstName() {
        return firstName;
    }

    public void setFirstName(String firstName) {
        this.firstName = firstName;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public long getPhoneNumber() {
        return phoneNumber;
    }

    public void setPhoneNumber(long phoneNumber) {
        this.phoneNumber = phoneNumber;
    }

    public Date getDateOfBirth() {
        return dateOfBirth;
    }

    public void setDateOfBirth(Date dateOfBirth) {
        this.dateOfBirth = dateOfBirth;
    }

    public long getBasicSalary() {
        return basicSalary;
    }

    public void setBasicSalary(long basicSalary) {
        this.basicSalary = basicSalary;
    }

    public int getRemainingLeaves() {
        return remainingLeaves;
    }

    public void setRemainingLeaves(int remainingLeaves) {
        this.remainingLeaves = remainingLeaves;
    }

    public int getUserId() {
		return userId;
	}

	public void setUserId(int userId) {
		this.userId = userId;
	}

	public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getLoginName() {
        return loginName;
    }

    public void setLoginName(String loginName) {
        this.loginName = loginName;
    }

    public String getLastName() {
        return lastName;
    }

    public void setLastName(String lastName) {
        this.lastName = lastName;
    }

    public UserType getUserType() {
        return userType;
    }

    public void setUserType(UserType userType) {
        this.userType = userType;
    }

    @Override
    public boolean equals(Object obj) {
        User newUser = (User) obj;
        return newUser.getUserId() == userId;
    }

    public int getFailedLoginAttempts() {
        return failedLoginAttempts;
    }

    public void setFailedLoginAttempts(int failedLoginAttempts) {
        this.failedLoginAttempts = failedLoginAttempts;
    }

    public Date getLastLoginFailedTime() {
        return lastLoginFailedTime;
    }

    public void setLastLoginFailedTime(Date lastLoginFailedTime) {
        this.lastLoginFailedTime = lastLoginFailedTime;
    }

    public UserSubType getUserSubType() {
        return userSubType;
    }

    public void setUserSubType(UserSubType userSubType) {
        this.userSubType = userSubType;
    }
}
